#ifndef unigame_GLRender_h
#define unigame_GLRender_h

#include "Render.h"
#include "platform/Device.h"
#if UNI_WIN32
	#include <Windows.h>
	#include "GL.h"
	#include "GLU.H"
#endif

namespace unigame
{
    class GLRender: public Render
    {
    public:
        GLRender(): Render(){}
        ~GLRender(){}
        
        void init();

		void setContext(void* hdc);
		void deleteContext();
		void renderStart();
		void renderEnd();

		void setColor(float r, float g, float b, float a);
		void enableDepth(bool isEnable);

		void setProjectMatrix(const Matrix4x4f& m);
		void setViewMatrix(const Matrixf& m);

		void setViewPort(float x, float y, float w, float h);

		void test();
        
    private:
		HGLRC m_glrc;
#if UNI_WIN32
		HDC m_hdc;
#endif
    };
}
#endif
